<?php $path = base_url().'public/frontend/';?>
<div id="contact-page" class="container">
    <div class="bg">

        <div class="row">
            <div class="col-sm-9">
                <div class="contact-form">
                    <h2 class="title text-center">Shipping Infomation</h2>
                    <form id="main-contact-form" class="contact-form row" name="contact-form" method="post">
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Order ID: </span><?php echo $invoices[0]['invoice_id'] ?></h2>
                        </div>
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Purchase Date: </span><?php echo $invoices[0]['invoice_date'] ?></h2>
                        </div>
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Received Date: </span><?php echo $invoices[0]['received_date'] ?></h2>
                        </div>
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Received Time: </span><?php echo $invoices[0]['received_time'] ?></h2>
                        </div>
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Contact Number: </span><?php echo $invoices[0]['contact_number'] ?></h2>
                        </div>
                        <div class="form-group col-md-6" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Status: </span><?php if($invoices[0]['status'] == 1) {echo "Shipment Delivered";}
                                                                                                else{ echo "Shipment waiting for validation";}?></h2>
                        </div>
                        <div class="form-group col-md-12" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Received Address: </span><?php echo $invoices[0]['received_address'] ?></h2>
                        </div>
                        <div class="form-group col-md-12" style="margin: 0px;height: 40px">
                            <h2 style="color: #696763;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 20px;
                                        font-weight: 300;
                                        margin-bottom: 30px;"><span>Shipping Note: </span><?php echo $invoices[0]['shipping_note'] ?></h2>
                        </div>

                    </form>
                </div>
                <div class="table-responsive cart_info" style="margin-top: 20px">
                    <h2 class="title text-center">Order Detail</h2>
                    <table class="table table-condensed">
                        <thead style="background: #FE980F; color: #ffffff">
                        <tr class="cart_menu">
                            <td class="image" style="width: 100px">Product ID</td>
                            <td class="description" style="width: 400px">Product Name</td>
                            <td class="price" style="width: 150px">Unit Price</td>
                            <td class="quantity" style="width: 100px">Quantity</td>
                            <td class="total">Amount</td>
                        </tr>
                        </thead>
                        <tbody id="tbody">
                        <?php foreach($invoices_detail as $invoice_detail) { ?>
                            <tr>
                                <td class="cart_product"><?php echo $invoice_detail['product_id'] ?></td>
                                <td class="cart_description"><?php echo $invoice_detail['product_name'] ?></td>
                                <td class="cart_price">$<?php echo $invoice_detail['unit_price'] ?></td>
                                <td class="cart_quantity"><?php echo $invoice_detail['quantity'] ?></td>
                                <td class="cart_total">$<?php echo $invoice_detail['amount'] ?></td>
                            </tr>
                        <?php } ?>
                        </tbody>
                    </table>
                </div>
                <div style="text-align: right">
                    <div class="col-md-6">

                    </div>
                    <div class="col-md-6">
                        <div class="col-md-6">

                        </div>
                        <div class="col-md-6">
                            <div class="col-md-6">
                                <h2 style="color: orange;
                                        font-family: 'Roboto', sans-serif;
                                        font-size: 30px;
                                        font-weight: 300;
                                        margin-bottom: 30px;">Total: </h2>
                            </div>
                            <div class="col-md-6">
                                <h2 style="color: orange">$<?php echo $invoices[0]['total'] ?></h2>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
